<%@ page language="java" contentType="text/html; charset=utf-8"  
    pageEncoding="utf-8"%>  
<!DOCTYPE html>
<html>	
<head>
<title>登录-火焰比赛系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<meta name="keywords" content="Flat Dark Web Login Form Responsive Templates, Iphone Widget Template, Smartphone login forms,Login form, Widget Template, Responsive Templates, a Ipad 404 Templates, Flat Responsive Templates" />
<link href="/match/css/style.css" rel='stylesheet' type='text/css' />
<!--//webfonts-->
<script src="/match/libs/jquery/3.2.1/jquery-3.2.1.js"></script>
<script src="/match/libs/tool/md5.js"></script>
</head>
<body>
<script>
$(function() {
	$("#loginButton").click(function(){
		var phone = $("#userName").val();
		var password = $("#password").val();
		if(phone == ""){
			$("#errorTip").html("手机号或者圈号不能为空");
			return;
		}
		if(password == ""){
			$("#errorTip").html("密码不能为空");
			return;
		}
		password = hex_md5(password);
		$.ajax({ //一个Ajax过程

			type : "post", //以post方式与后台沟通

			url : "/match/user/login", //与此php页面沟通

			dataType : 'json',//返回的值以 JSON方式 解释

			data : "userName="+phone+"&password="+password, //发给php的数据有两项，分别是上面传来的u和p

			success : function(json) {//如果调用php成功		

				var dataObj=eval(json);//转换为json对象

				var type = dataObj.type;
				var status = dataObj.status;
				if(status == "success"){
					window.location = before+dataObj.requestUrl+after;
				}else{					
						$("#errorTip").html(dataObj.message);
					
				}
				
			}
		});
	});  
});
</script>
 <!--SIGN UP-->
 <h1>火焰比赛系统</h1>
<div class="login-form">
	<div class="close"> </div>
		<div class="head-info">
			<label class="lbl-1"> </label>
			<label class="lbl-2"> </label>
			<label class="lbl-3"> </label>
		</div>
			<div class="clear"> </div>
	<div class="avtar">
		<img src="/match/images/avtar.png" />
	</div>
	
			<form>
					<input type="text" class="text" value="Username" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Username';}" id="userName" >
						<div class="key">
					<input type="password" value="Password" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Password';}" id="password">
						</div>
			</form>
			
	<div class="signin">
		<input type="button" value="Login" id="loginButton" >
	</div>
</div>
 <div class="copy-rights">
					<p>Copyright &copy; 2017.朱海斌 All rights reserved.</p>
			</div>

</body>
</html>